<?php
require_once '../config.php';
require_once '../source.php';
require_once '../dao/dao_db.php';
require_once '../dao/dao_teacher_manage.php';
session_start();
session_cache_limiter('private');
if(!isset($_SESSION['userid'])||$_SESSION['level']!=ADMINISTRATOR){
	header("LOCATION:../error.php?errcode=1");
}else{
	$userid=$_GET['userid'];
	del_teacher_account($userid);
	mysql_close();
	header("LOCATION:../teacher_manage.php");
}

?>
